/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vendingmachine;

/**
 *
 * @author Jonathan Ery
 */
public final class UserDisplayNotification {
    public static final int INVALID_SELECTION = 0;
    public static final int PRODUCT_EMPTY = 1;
    public static final int SELECTOR_UNAVAIL = 2;
    public static final int PRODUCT_DISPENSED = 3;
    public static final int COIN_DISPENSED = 4;
    public static final int SLUG_DISPENSED = 5;
    public static final int COUNT_MONEY = 6;
    public static final int UNSUFFICIENT_FUNDS = 7;
    public static final int NOTHING_DISPENSED = 8;
    //public static final int SUM_MONEY = 9;
    private int notifId;
    //private static int changeValue;
    private static String notif[] = {
        "Invalid Selection",
	"Vending machine product is empty. There is no product which can be selected.",
        "Product Selector is unavailable. Please insert a valid coin first.",
        "Product is Dispensed",
        "Coin is Dispensed",
        "Your object is a slug. Slug is dispensed",
        //"Change with "+ UserDisplayNotification.changeValue  +" cents value is Dispensed.",
        "",
        "Unsufficient funds, please insert more coins or hit force eject.",
        "Nothing to dispense",
        //""
        //"Vending machine tray is empty. There is no product which can be selected."
    };
    
    public UserDisplayNotification(){
        notifId = 0;
        //changeValue = 0;
        this.response();
    }
    
    public UserDisplayNotification(int x){
        notifId = x;
        //changeValue = 0;
        this.response();
    }
    
    public UserDisplayNotification(int x, String type, int money, boolean dispensed){
        notifId = x;
        //changeValue = change;
        notif[x] = "Sum of " + type + " money: " + money + " cents.";
        if(dispensed){
            notif[x] = notif[x] + " Money is dispensed.";
        }
        this.response();
    }
    
//    public UserDisplayNotification(int x, int money){
//        notifId = x;
//        notif[x] = "Sum of money inserted: " + money + " cents";
//        this.response();
//    }

    public void response(){
        System.out.println(notif[notifId]);
    }
}
